//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { OsPlatform, OsPlatformResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooOsPlatformList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<OsPlatformResponse>(`/uctoo/os_platform/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooOsPlatform = async (id: string) => {
  return requestClient.get<OsPlatform>(`/uctoo/os_platform/${id}`);
};

export const adductooOsPlatform = async (data: Partial<OsPlatform>) => {
  return requestClient.post<OsPlatform>('/uctoo/os_platform/add', data);
};

export const edituctooOsPlatform = async (data: Partial<OsPlatform>) => {
  return requestClient.post<OsPlatform>('/uctoo/os_platform/edit', data);
};

export const deleteuctooOsPlatform = async (id: string) => {
  return requestClient.post<any>('/uctoo/os_platform/del', { id });
};
